package factorymethod;

import factorymethod.creator.Creator;
import factorymethod.creator.CreatorA;
import factorymethod.creator.CreatorB;

/**
 * description:
 *  客户端
 * @author yuanmenglv on 2019/11/28
 */
public class Client {
    public static void main(String[] args) {
        /**
         * 将类的实例化交由创建者的子类
         *
         * 创建者只需提供一个抽象的工厂方法让子类实现即可
         *
         */
        System.out.println("预定A店产品------------------------");
        Creator creatorA = new CreatorA();
        creatorA.orderProduct("B");
        System.out.println("预定B店产品------------------------");
        Creator creatorB = new CreatorB();
        creatorB.orderProduct("B");


    }
}
